<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css"
	href="__PUBLIC__/ueditor/themes/default/ueditor.css" />
<style>
.myEditor {
	width: 1024px;
}
</style>

<script type="text/javascript">


		$(document).ready(function(){
		  //元素值设定
			//$('input:radio[name="publishindex"]').attr("checked",'0');
			
		});


	
	    function demo(){	
	    	//alert($('input:radio[name="r1"]:checked').val()); 
		    /*
	    	editor.sync();
			$.post('__URL__/bulletinInsert',
    	    {	
	    	    'id':"<?php echo ($vo['id']); ?>",	    	    
	    	    'mark':"<?php echo ($mark); ?>" ,
				'rel':$("#rel").val(),
	    		'title':$("#title").val(),
	    		'content':editor.getContent(),
	    		'module':$("#module").val(),
	    		'author':$("#author").val(),	    	    		
	    		'rel':$("#rel").val(),
	    		'summary':$("#summary").val(),
	    		'submodule':$("#submodule").val(),
	    		'xFilePath':$("#xFilePath").val()
	    	},
			    function(data){
					alert(data.info);					
			    },
		    'json');	
		    */
	    }
	</script>
</head>
<body>
<form method="post" action="__URL__/bulletinInsert"
	class="pageForm required-validate"
	onsubmit="return local_validateCallback(this)"><input
	type="hidden" name="mark" value="<?php echo ($mark); ?>" /> <input type="hidden"
	name="id" value="<?php echo ($vo['id']); ?>" /> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>

<!-- open ckfinder dialog -->
<script type="text/javascript">

	function BrowseServer()
	{	
		var finder = new CKFinder();
		finder.basePath = '../';	// The path for the installation of CKFinder (default = "/ckfinder/").
		finder.selectActionFunction = SetFileField;
		finder.popup();
	}
	function SetFileField( fileUrl )
	{
		document.getElementById( 'imageurl' ).value = fileUrl;
	}

</script>


</head>
<body>


<div class="pageHeader">
<div class="pageFormContent" defH="60">



<p><label>文章标题：</label> <input name="title" type="text" size="30"
	id="title" maxlength="50" class="required" value="<?php echo ($vo['title']); ?>" />
</p>
<p><label>文章作者：</label> <input name="author" type="text" size="30"
	id="author" maxlength="30" class="required" value="<?php echo ($vo['author']); ?>" />
</p>
<p><label>文章引用：</label> <input name="rel" type="text" size="30"
	id="rel" value="<?php echo ($vo['rel']); ?>" /></p>
<p><label>所属模块：</label> <select class="combox" name="module"
	id="module" ref="submodule"
	refUrl="__APP__/Bulletin/getModule?code={value}">
	<option value="">---请选择---</option>
	<?php if(is_array($moduleList)): $i = 0; $__LIST__ = $moduleList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$modulevo): ++$i;$mod = ($i % 2 )?><?php if($vo['module_id'] == $modulevo['id']): ?><option value="<?php echo ($modulevo['id']); ?>" selected="selected"><?php echo ($modulevo['name']); ?></option>
	<?php else: ?>
	<option value="<?php echo ($modulevo['id']); ?>"><?php echo ($modulevo['name']); ?></option><?php endif; ?><?php endforeach; endif; else: echo "" ;endif; ?>
</select> <select class="combox" name="submodule" id="submodule">
	<emptyempty name="$vo['submodule_id']">
	<option value="<?php echo ($submodulevo['id']); ?>" selected="selected"><?php echo ($vo['submodule']); ?></option>
	</emptyempty>
	<option value="all">---请选择---</option>
</select></p>

<p><label>是否发布至首页：</label> <?php if($vo['publishindex'] == 1): ?><input type="radio" name="publishindex" value="1" checked="checked" />是
<input type="radio" name="publishindex" value="0" />否 <?php else: ?> <input
	type="radio" name="publishindex" value="1" />是 <input type="radio"
	name="publishindex" value="0" checked="checked" />否<?php endif; ?></p>

<p><label>缩略图路径：</label> <input id="imageurl" name="imageurl"
	type="text" value="<?php echo ($vo['imageurl']); ?>" size="14" /> <input type="button"
	value="选择图片" onclick="BrowseServer();" /></p>
<dl class="nowrap">
	<dt>文章摘要（不要超过100个汉字）：</dt>
	<dd><textarea name="summary" cols="131" rows="5" id="summary"
		maxlength="100"><?php echo ($vo['summary']); ?></textarea></dd>
</dl>

<dl class="nowrap">
	<div class="buttonActive">
	<div class="buttonContent">
	<button type="submit">提 交</button>
	</div>
	</div>
</dl>

</div>
</div>
</body>
</html> <input type="hidden"
	name="callbackType" value="forward"> <input type="hidden"
	name="forwardUrl" value="__URL__/index">
<div id="myEditor"></div>
</form>

<div id="god" class="panel" defH="160"><!-- 
			<script type="text/plain" id="myEditor">
				<?php echo ($vo['content']); ?>	
			</script>
			 --> <script type="text/javascript">
			
				var option = {
					initialContent: '<?php echo ($vo['content']); ?>',//初始化编辑器的内容		            
		            textarea: 'editorcontent'		            
		        };
			    var editor = new baidu.editor.ui.Editor(option);   			   
			    editor.render('myEditor');
			    editor.focus();
			</script></div>


</body>
</html>